﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TibcoQueueMonitor
{
    /// <summary>
    /// An event argument object that delivers a message from a control, and
    /// indicating if it is a critical error.
    /// </summary>
    [Serializable]
    public class StatusNotificationEventArgs : EventArgs
    {
        #region Private Fields
        private string _message;
        private bool _isError;

        #endregion //Private Fields

        #region Public Properties
        /// <summary>
        /// Gets the message.
        /// </summary>
        /// <value>The message.</value>
        public string Message
        {
            get { return _message; }
        }

        /// <summary>
        /// Gets a value indicating whether this instance is an error.
        /// </summary>
        /// <value><c>true</c> if this instance is an error; otherwise, <c>false</c>.</value>
        public bool IsError
        {
            get { return _isError; }
        }

        #endregion //Public Properties

        #region Constructors
        /// <summary>
        /// Initializes a new instance of the <see cref="StatusNotificationEventArgs"/> class.
        /// </summary>
        public StatusNotificationEventArgs()
            : base()
        { }

        /// <summary>
        /// Initializes a new instance of the <see cref="StatusNotificationEventArgs"/> class.
        /// </summary>
        /// <param name="message">The message.</param>
        public StatusNotificationEventArgs(string message)
            : base()
        {
            _message = message;
            _isError = false;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="StatusNotificationEventArgs"/> class.
        /// </summary>
        /// <param name="message">The message.</param>
        /// <param name="isError">if set to <c>true</c>, it indicates this message is an error.</param>
        public StatusNotificationEventArgs(string message, bool isError)
            : base()
        {
            _message = message;
            _isError = isError;
        }

        #endregion //Constructors
    }
}
